package com.example.demo.Service;

import com.example.demo.Entity.Friend;
import com.example.demo.Entity.MessageSession;
import com.example.demo.Mapper.MessageSessionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
@Service
public class MessageSessionService {
    @Autowired
    public MessageSessionMapper messageSessionMapper;
    public  List<Integer>getSessionId(int id){
        return messageSessionMapper.getSessionId(id);
    }
   public List<Friend> getUserid(int sessionId,int id){
       return messageSessionMapper.getUserid(sessionId,id);
   }
   public int  addSession(MessageSession messageSession){
        return messageSessionMapper.addSession(messageSession);
   }
public  int addSessionUser(int sessionId,int userid){
        return messageSessionMapper.addSessionUser(sessionId,userid);
}
}
